<template>
  <div class="test">
    <h1>爷爷</h1>
    <button @click="handleClick">button</button>
    <parent :msg="msg"></parent>
  </div>
</template>
<script>
import Parent from './Parent.vue'
export default {
  data() {
    return {
      msg: '爷爷给的100块压岁钱'
    }
  },
  components: {
    Parent
  },
  methods: {
    handleClick() {
      this.$bus.$emit('getdata', this.msg)
    }
  }
}
</script>
<style lang="scss"></style>
